package com.collect.zambia.zhiBean.zhiReceive;

import android.text.TextUtils;

import com.collect.zambia.zhiUtils.StringUtil;

import java.io.Serializable;
import java.util.ArrayList;

public class ZHIROrderEntity implements Serializable {

    private String principal;
    private String overdueFee;
    private String appLink;
    private String loanTime;
    private String repayTime;
    private String interest;
    private String appName;
    private String mobile;
    private String overdueDay;
    private String repayAmount;
    private String fullName;
    private String language;
    private String partRepayAmount;

    private String panCardNo;
    private String maritalStatus;
    private String gender;
    private String proofAddressDetail;
    private String birthDate;
    private String userType;

    private String email;
    private String leven;

    private String repayProcessFee;

    private String offlineRepayBankName;
    private String offlineRepayBankAccount;
    private String offlineRepayBankAccountName;

    private String offlineAccountFlag;
    private String ptpTime;

    private String status;

    private String bvnNumber;
    private String companyName;
    private String companyAddress;
    private String industry;
    private String companyCity;
    private String workingSince;
    private String monthlyIncome;
    private String currResidence;
    private String employmentType;

    private ArrayList<String> mobileList;
    private String photoUrl;

    private String repayLinkTimes;

    public String getPrincipal() {
        return principal;
    }

    public void setPrincipal(String principal) {
        this.principal = principal;
    }

    public String getOverdueFee() {
        return overdueFee;
    }

    public void setOverdueFee(String overdueFee) {
        this.overdueFee = overdueFee;
    }

    public String getAppLink() {
        return appLink;
    }

    public void setAppLink(String appLink) {
        this.appLink = appLink;
    }

    public String getLoanTime() {
        return loanTime;
    }

    public void setLoanTime(String loanTime) {
        this.loanTime = loanTime;
    }

    public String getRepayTime() {
        return repayTime;
    }

    public void setRepayTime(String repayTime) {
        this.repayTime = repayTime;
    }

    public String getInterest() {
        return interest;
    }

    public void setInterest(String interest) {
        this.interest = interest;
    }

    public String getAppName() {
        return appName;
    }

    public void setAppName(String appName) {
        this.appName = appName;
    }

    public String getMobile() {
        return mobile;
    }

    public void setMobile(String mobile) {
        this.mobile = mobile;
    }

    public String getOverdueDay() {
        return overdueDay;
    }

    public void setOverdueDay(String overdueDay) {
        this.overdueDay = overdueDay;
    }

    public String getRepayAmount() {
        return repayAmount;
    }

    public void setRepayAmount(String repayAmount) {
        this.repayAmount = repayAmount;
    }

    public String getFullName() {
        return fullName;
    }

    public void setFullName(String fullName) {
        this.fullName = fullName;
    }

    public String getLanguage() {
        return language;
    }

    public void setLanguage(String language) {
        this.language = language;
    }

    public String getPanCardNo() {
        return panCardNo;
    }

    public void setPanCardNo(String panCardNo) {
        this.panCardNo = panCardNo;
    }

    public String getMaritalStatus() {
        return maritalStatus;
    }

    public void setMaritalStatus(String maritalStatus) {
        this.maritalStatus = maritalStatus;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public String getProofAddressDetail() {
        return proofAddressDetail;
    }

    public void setProofAddressDetail(String proofAddressDetail) {
        this.proofAddressDetail = proofAddressDetail;
    }

    public String getBirthDate() {
        return birthDate;
    }

    public void setBirthDate(String birthDate) {
        this.birthDate = birthDate;
    }

    public String getUserType() {
        return userType;
    }

    public void setUserType(String userType) {
        this.userType = userType;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getLeven() {
        if (TextUtils.isEmpty(leven)) {
            leven = "";
        }
        leven = leven.toUpperCase();
        return leven;
    }

    public void setLeven(String leven) {
        this.leven = leven;
    }

    public String getOfflineRepayBankName() {
        return StringUtil.safeString(offlineRepayBankName);
    }

    public void setOfflineRepayBankName(String offlineRepayBankName) {
        this.offlineRepayBankName = offlineRepayBankName;
    }

    public String getOfflineRepayBankAccount() {
        return StringUtil.safeString(offlineRepayBankAccount);
    }

    public void setOfflineRepayBankAccount(String offlineRepayBankAccount) {
        this.offlineRepayBankAccount = offlineRepayBankAccount;
    }

    public String getOfflineRepayBankAccountName() {
        return StringUtil.safeString(offlineRepayBankAccountName);
    }

    public void setOfflineRepayBankAccountName(String offlineRepayBankAccountName) {
        this.offlineRepayBankAccountName = offlineRepayBankAccountName;
    }

    public String getRepayProcessFee() {
        return StringUtil.safeString(repayProcessFee);
    }

    public void setRepayProcessFee(String repayProcessFee) {
        this.repayProcessFee = repayProcessFee;
    }

    public String getPartRepayAmount() {
        return StringUtil.safeString(partRepayAmount);
    }

    public void setPartRepayAmount(String partRepayAmount) {
        this.partRepayAmount = partRepayAmount;
    }

    public String getOfflineAccountFlag() {
        return StringUtil.safeString(offlineAccountFlag);
    }

    public void setOfflineAccountFlag(String offlineAccountFlag) {
        this.offlineAccountFlag = offlineAccountFlag;
    }

    public boolean isHadOfflineAccount() {
        return StringUtil.safeString(offlineAccountFlag).equalsIgnoreCase("YES");
    }

    public String getPtpTime() {
        return StringUtil.safeString(ptpTime);
    }

    public void setPtpTime(String ptpTime) {
        this.ptpTime = ptpTime;
    }

    public String getStatus() {
        return StringUtil.safeString(status);
    }

    public void setStatus(String status) {
        this.status = status;
    }

    public boolean isSettleStatus() {
        //CREATED,PROCESSING,SETTLED
        return getStatus().equalsIgnoreCase("SETTLED");
    }

    public String getBvnNumber() {
        return StringUtil.safeString(bvnNumber);
    }

    public void setBvnNumber(String bvnNumber) {
        this.bvnNumber = bvnNumber;
    }

    public String getCompanyName() {
        return StringUtil.safeString(companyName);
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getCompanyAddress() {
        return StringUtil.safeString(companyAddress);
    }

    public void setCompanyAddress(String companyAddress) {
        this.companyAddress = companyAddress;
    }

    public String getIndustry() {
        return StringUtil.safeString(industry);
    }

    public void setIndustry(String industry) {
        this.industry = industry;
    }

    public String getCompanyCity() {
        return StringUtil.safeString(companyCity);
    }

    public void setCompanyCity(String companyCity) {
        this.companyCity = companyCity;
    }

    public String getWorkingSince() {
        return StringUtil.safeString(workingSince);
    }

    public void setWorkingSince(String workingSince) {
        this.workingSince = workingSince;
    }

    public String getMonthlyIncome() {
        return StringUtil.safeString(monthlyIncome);
    }

    public void setMonthlyIncome(String monthlyIncome) {
        this.monthlyIncome = monthlyIncome;
    }

    public String getCurrResidence() {
        return StringUtil.safeString(currResidence);
    }

    public void setCurrResidence(String currResidence) {
        this.currResidence = currResidence;
    }

    public ArrayList<String> getMobileList() {
        if (mobileList == null) {
            mobileList = new ArrayList<>();
        }
        return mobileList;
    }

    public void setMobileList(ArrayList<String> mobileList) {
        this.mobileList = mobileList;
    }

    public String getPhotoUrl() {
        return StringUtil.safeString(photoUrl);
    }

    public void setPhotoUrl(String photoUrl) {
        this.photoUrl = photoUrl;
    }

    public String getRepayLinkTimes() {
        return StringUtil.safeString(repayLinkTimes);
    }

    public void setRepayLinkTimes(String repayLinkTimes) {
        this.repayLinkTimes = repayLinkTimes;
    }

    public boolean isRepayLinkTimesMaxLimit() {
        String glinktimes = getRepayLinkTimes();
        if (TextUtils.isEmpty(glinktimes)) {
            return false;
        }
        try {
            int glinktimeInt = Integer.parseInt(glinktimes);
            return (glinktimeInt >= 20);
        } catch (Exception e) {
            e.printStackTrace();
        }
        return false;
    }

    public String getEmploymentType() {
        return StringUtil.safeString(employmentType);
    }

    public void setEmploymentType(String employmentType) {
        this.employmentType = employmentType;
    }
}
